﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Business
{
    public class Caterer
    {
        FosIntelEntities _en = new FosIntelEntities();


        public List<FoodSell> GetFood()
        {
            FoodSell food1 = new FoodSell();
            food1.name = "Nasi Lemak";
            food1.price = "RM8";
            food1.description = "This is testing for Nasi Lemak ...";

            FoodSell food2 = new FoodSell();
            food2.name = "Nasi Goring";
            food2.price = "RM7";
            food2.description = "This is testing for Nasi Goring ...";

            List<FoodSell> foods = new List<FoodSell>();
            foods.Add(food1);
            foods.Add(food2);
            return foods;
        }


        public List<fos_User> GetCatererBySite(long siteId)
        {
            List<fos_User> caterers = (from a in _en.fos_SiteLinkCaterer
                                       where a.SiteId == siteId && a.IsDeleted != 1 && a.fos_User.IsDeleted != 1
                                       select a.fos_User).ToList<fos_User>();
            return caterers;

        }


    }


       


    /// <summary>
    /// Food class
    /// </summary>
    public class FoodSell
    {
        public string name { get; set; }
        public string price { get; set; }
        public string description { get; set; }
    }
}
